package com.niiwoo.civet.account.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by DELL on 2017/12/11.
 */
@AllArgsConstructor
@Getter
public enum EntranceTypeEnum {

    ALL_BILL("1001","账单"),
    GUARANTEE_BILL("1002","担保账单"),
    INVEST_BILL("1003","投资账单"),
    INFORM_ENTRANCE_BILL("1004","通知入口进入账单"),
    BORROW_BILL("1005","借款账单"),
    TURN_BILL("1006","尽调账单"),
    BORROW_INVEST_PLAN_BILL("1007","回款，还款计划账单入口"),
    ;

    private String code;

    private String codeDesc;

    public static EntranceTypeEnum getTypeEnumByCode(String enumCode) {
        if (enumCode != null && !"".equals(enumCode)) {
            for (EntranceTypeEnum retEnum : EntranceTypeEnum.values()) {
                if (retEnum.getCode().equals(enumCode)) {
                    return retEnum;
                }
            }
        }
        return null;
    }

}
